package com.chixing.day03_oop;


public class Account {
    private long accNo;
    private String accName;
    private String accPassword;
    private long accTelno;
    private double accBalance;
    private String accType;

    public Account(){

    }
    public Account(long no,String name,String passwd,long telno,double balance,String type){
        this.accNo = no;
        this.accName = name;
        this.accPassword = passwd;
        this.accTelno = telno;
        this.accBalance = balance;
        this.accType = type;

    }
    public long getAccNo() {
        return accNo;
    }

    public void setAccNo(long accNo) {
        this.accNo = accNo;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public String getAccPassword() {
        return accPassword;
    }

    public void setAccPassword(String accPassword) {
        this.accPassword = accPassword;
    }

    public long getAccTelno() {
        return accTelno;
    }

    public void setAccTelno(long accTelno) {
        this.accTelno = accTelno;
    }

    public double getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(double accBalance) {
        this.accBalance = accBalance;
    }

    public String getAccType() {
        return accType;
    }

    public void setAccType(String accType) {
        this.accType = accType;
    }

    public double depoist(double balance){
        this.accBalance += balance;
        return this.accBalance;
    }

    public double withdraw(double balance){
        this.accBalance -= balance;
        return this.accBalance;
    }

    public void say(){
        if (this.accType == "0")
            this.accType = "储蓄银行";
        else if (this.accType == "1")
            this.accType = "信用账户";
        System.out.println("账户账号：" + this.accNo + " 账户姓名：" + this.accName + " 账户密码：" + this.accPassword +
                            " 账户手机号：" + this.accTelno + " 账户余额：" + this.accBalance + " 账户类型：" + this.accType );
    }



    public Account fun1(){
        return null;
    }
    public Account fun2(){
        return new Account();
    }
    public Account fun3(){
        return this;
    }
    public int fun4(){
        return 0;
    }


}
